Skip to content

fix(ai): align stream TTFT with first effective output - #1301

Merged
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:main
Jun 24, 2026
Merged

fix(ai): align stream TTFT with first effective output#1301
wsp1911 merged 1 commit into
GCWing:mainfrom
wsp1911:main

Conversation

@wsp1911

@wsp1911 wsp1911 commented Jun 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

Align stream TTFT handling with the first effective streamed output instead of HTTP 200 / header arrival, make explicit null TTFT config wait indefinitely, and update the model settings UI copy to match the new behavior.

Fixes #

Type and Areas

Type:

bug fix / regression fix / UI/UX / test

Areas:

AI adapters, Rust core, web UI, config, i18n

Motivation / Impact

The previous TTFT behavior could keep waiting after the configured timeout in some cases because the timeout boundary was too close to stream setup rather than the first effective streamed output. This change moves TTFT enforcement to the stream handlers, treats text / reasoning / tool-call output as valid first output, removes the reasoning-mode-specific TTFT floor, preserves explicit null as indefinite wait, and updates the settings UI/tooltips so the behavior is clearer.

User-facing impact:

  • TTFT now times out based on the first effective streamed output, not HTTP 200 alone.
  • Setting TTFT to null correctly means indefinite wait.
  • Stream timeout settings copy is clearer, and the UI now notes that changes take effect next turn.

Verification

  • pnpm run type-check:web
  • pnpm run i18n:audit

Reviewer Notes

  • Scope is intentionally end-to-end: runtime timeout semantics, config propagation, fixture coverage, and settings UI copy were updated together to keep behavior and documentation aligned.
  • Added fixture/test coverage for delayed first stream output so TTFT no longer treats HTTP 200 as sufficient progress.
  • The stream timeout settings UI now uses per-field tooltip hints and a short "changes take effect next turn" description.

Checklist

  • This PR is focused and does not include secrets, temporary prompts, generated scratch files, or unrelated artifacts.
  • Relevant verification is recorded above, or skipped checks are explained.
  • User-facing strings, docs, and locales are updated where applicable.

- apply TTFT to first effective streamed output instead of HTTP 200
- allow null TTFT config to wait indefinitely
- remove reasoning-specific TTFT override
- clarify stream timeout UI copy and next-turn activation
@wsp1911
wsp1911 marked this pull request as ready for review June 24, 2026 10:36
@wsp1911
wsp1911 merged commit f3dc1b9 into GCWing:main Jun 24, 2026
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant